import request from '/shop/request';

export default {
	//
	listByIds: (data) =>
		request({
			url: '/api/coupon/listbyids',
			method: 'POST',
			data,
			custom: {
				showLoading: false,
			},
		}),
	userCoupon: (params) =>
		request({
			url: '/api/user/coupon',
			method: 'GET',
			params,
		}),
	detail: (id, user_coupon_id) =>
		request({
			url: '/api/coupon/' + id,
			method: 'GET',
			params: {
				user_coupon_id,
			},
		}),
	get: (id) =>
		request({
			url: '/api/user/coupon/get/' + id,
			method: 'GET',
		}),
	listByGoods: (id) =>
		request({
			url: '/api/coupon/listbygoods/' + id,
			method: 'GET',
		}),
};
